from dc_shop.core.models.dto import DiscountDTO
from dc_shop.database.models import Discount


def convert_db_model_to_discount_dto(discount: Discount) -> DiscountDTO:
    return DiscountDTO(
        id=discount.id, discount_percent=discount.discount_percent, works_inside_category=discount.works_inside_category
    )
